From: Florian Müllner Date: Sat, 6 Nov 2021 02:34:25 +0000 (+0100) Subject: dbusServices/extensions: Instruct gjs to generate unique GType names X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~536^2^2~7 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8c1cf3fa3daad8af31f8d4428d1296aa4507864e;p=gnome-shell.git dbusServices/extensions: Instruct gjs to generate unique GType names Like the main gnome-shell process, the extensions service loads code from extensions. It therefore makes sense to prevent GType name clashes there as well, just like we already to in the gnome-shell process. This may break some extensions that use the old type name in .ui files, but they can be fixed easily by specifying an explicit GTypeName. Part-of: --- diff --git a/js/dbusServices/extensions/main.js b/js/dbusServices/extensions/main.js index 0b6521e9e..97a28aa98 100644 --- a/js/dbusServices/extensions/main.js +++ b/js/dbusServices/extensions/main.js @@ -3,7 +3,7 @@ imports.gi.versions.Gdk = '4.0'; imports.gi.versions.Gtk = '4.0'; -const { Gtk } = imports.gi; +const { GObject, Gtk } = imports.gi; const pkg = imports.package; const { DBusService } = imports.dbusService; @@ -13,6 +13,8 @@ function main() { Gtk.init(); pkg.initFormat(); + GObject.gtypeNameBasedOnJSPath = true; + const service = new DBusService( 'org.gnome.Shell.Extensions', new ExtensionsService());